#pragma once
#define NULL 0

class Int
{
private:
	int *data;
public:
	Int();
	Int(int number);

	operator int();
	Int operator++ ();
	Int operator++ (int);
	Int operator-- ();
	Int operator-- (int);
	void operator+= (int number);
	void operator-= (int number);
	void operator*= (int number);
	void operator/= (int number);

	void free();
};

Int::Int()
{
	this->data = new int;
}

Int::Int(int number)
{
	this->data = new int(number);
}

Int::operator int()
{
	return *this->data;
}

Int Int::operator++ ()
{
	return ++(*this->data);
}

Int Int::operator++ (int)
{
	return (*this->data)++;
}

Int Int::operator-- ()
{
	return --(*this->data);
}

Int Int::operator-- (int)
{
	return (*this->data)--;
}

void Int::operator+= (int number)
{
	*this->data += number;
}

void Int::operator-= (int number)
{
	*this->data -= number;
}

void Int::operator*= (int number)
{
	*this->data *= number;
}

void Int::operator/= (int number)
{
	*this->data /= number;
}

void Int::free()
{
	this->data = new int;
	delete data;
	this->data = NULL;
}